package com.data.common.constant.enums;

import lombok.Getter;

/**
 * @author xiayuanpeng
 * @since 2022/1/7
 */
@Getter
public enum ApiEnum {
    /**
     * 企业工商信息查询
     */
    COMPANY_TYPE_100(100,"企业工商信息查询")
    ;

    private Integer types;
    private String msg;

    ApiEnum(Integer types, String msg) {
        this.types = types;
        this.msg = msg;
    }
    public static ApiEnum getInstanceByCode(Integer code){
        ApiEnum[] values = values();
        for (ApiEnum value : values) {
            if(code.equals(value.types)){
                return value;
            }
        }
        return COMPANY_TYPE_100;
    }
}
